﻿/** 
 * Copyright / Licence
 * <p>
 * You are free:
 * <li>to Share — to copy, distribute and transmit the work
 * <li>to Remix — to adapt the work
 * </p>
 * <p>
 * Under the following conditions:
 * <li>Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
 * <li>Noncommercial — You may not use this work for commercial purposes.
 * <li>Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
 * </p>
 * <p>
 * More information can be found here:
 * <br/>
 * http://creativecommons.org/licenses/by-nc-sa/3.0/
 * </p>
 * <p>
 * Please contact Manfred Weber [manfred.weber@gmail.com] if you require a commercial licence
 * </p>
 */
 package org.dschini.data.ui.maps.world {
	
	import org.dschini.utils.*;
	import org.dschini.data.ui.maps.*;
	import org.dschini.data.ui.maps.world.southamerica.*;
	
	public class SouthAmericaMapData extends MapData
	{
		public var uruguayMapData:UruguayMapData;
		public var argentinaMapData:ArgentinaMapData;
		public var chileMapData:ChileMapData;
		public var falklandIslandsMapData:FalklandIslandsMapData;
		public var brazilMapData:BrazilMapData;
		public var paraguayMapData:ParaguayMapData;
		public var boliviaMapData:BoliviaMapData;
		public var peruMapData:PeruMapData;
		public var ecuadorMapData:EcuadorMapData;
		public var trinidadAndTobagoMapData:TrinidadAndTobagoMapData;
		public var colomboMapData:ColomboMapData;
		public var venezuelaMapData:VenezuelaMapData;
		public var guyanaMapData:GuyanaMapData;
		public var surinameMapData:SurinameMapData;
		public var guyaneMapData:GuyaneMapData;

		public function SouthAmericaMapData():void
		{
			_title = "<undefined>";
			locationData = new ExtendedArray();
			countries = new Array();
			backgroundVisible = false;
			countryLinesVisible = true;
			shapeVisible = true;
			
			uruguayMapData = new UruguayMapData();
			argentinaMapData = new ArgentinaMapData();
			chileMapData = new ChileMapData();
			falklandIslandsMapData = new FalklandIslandsMapData();
			brazilMapData = new BrazilMapData();
			paraguayMapData = new ParaguayMapData();
			boliviaMapData = new BoliviaMapData();
			peruMapData = new PeruMapData();
			ecuadorMapData = new EcuadorMapData();
			trinidadAndTobagoMapData = new TrinidadAndTobagoMapData();
			colomboMapData = new ColomboMapData();
			venezuelaMapData = new VenezuelaMapData();
			guyanaMapData = new GuyanaMapData();
			surinameMapData = new SurinameMapData();
			guyaneMapData = new GuyaneMapData();
			
			countries = [
				uruguayMapData,
				argentinaMapData,
				chileMapData,
				falklandIslandsMapData,
				brazilMapData,
				paraguayMapData,
				boliviaMapData,
				peruMapData,
				ecuadorMapData,
				trinidadAndTobagoMapData,
				colomboMapData,
				venezuelaMapData,
				guyanaMapData,
				surinameMapData,
				guyaneMapData
			]
		}
		
		override public function set lang( lang:String ):void
		{
			_lang = lang;
			switch( _lang ){
				case "en":
					_title = "South America";
					break;
				case "de":
					_title = "Süd Amerika";
					break;
			}
			var i:int;
			for(i=0; i<countries.length; i++){
				MapData(countries[i]).lang = lang;
			}
			for(i=0; i<locationData.length; i++){
				MapLocationData(locationData[i]).lang = lang;
			}
		}
	}
}
